package com.ruoyi.web.controller;

import com.ruoyi.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.pms.entity.YytShopShare;
import com.ruoyi.common.pms.service.YytShopShareService;

import java.time.LocalDateTime;

/**
* <p>
    *  前端控制器
    * </p>
*
* @author MrPing
* @since 2022-05-30
*/
@RestController
@RequestMapping("share")
public class YytShopShareController{

    @Autowired
    private YytShopShareService yytShopShareService;

    /**
     * 添加分享日志
     * @param yytShopShare
     * @return
     */
    @PostMapping("/addShopShare")
    public ResponseResult addShopShare(@RequestBody YytShopShare yytShopShare){
        yytShopShare.setShareTime(LocalDateTime.now());
        return ResponseResult.success(yytShopShareService.save(yytShopShare));
    }

}
